package com.guanglan.serviceImpl;

import com.guanglan.entity.SysRole;
import com.guanglan.mapper.SysRoleMapper;
import com.guanglan.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * 作者: 光蓝Comet
 * Date: 2018-06-20 15:34
 * Description: 一句话说明这个类的作用
 * Since 1.0
 */
@Service
public class SysRoleServiceImpl implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return sysRoleMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysRole sysRole) {
        return sysRoleMapper.insert(sysRole);
    }

    @Override
    public int insertSelective(SysRole sysRole) {
        return sysRoleMapper.insertSelective(sysRole);
    }

    @Override
    public SysRole selectByPrimaryKey(Long id) {
        return sysRoleMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysRole sysRole) {
        return sysRoleMapper.updateByPrimaryKeySelective(sysRole);
    }

    @Override
    public int updateByPrimaryKey(SysRole sysRole) {
        return sysRoleMapper.updateByPrimaryKey(sysRole);
    }

    @Override
    public List<SysRole> selectRoles() {
        return sysRoleMapper.selectRoles();
    }

    @Override
    public List<SysRole> selectSysRolesByUserName(String userName) {
        return sysRoleMapper.selectSysRolesByUserName(userName);
    }

    @Override
    public List<SysRole> selectSysRolesByRoleName(String roleName) {
        return sysRoleMapper.selectSysRolesByRoleName(roleName);
    }
}
